﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using AMatysiak.Methods;

namespace AMatysiakTest.Methods
{
    [TestClass]
    public class MonthPolishNameTest
    {
        List<string> months = new List<string>(12)
            {
                "styczeń",
                "luty",
                "marzec",
                "kwiecień",
                "maj",
                "czerwiec",
                "lipiec",
                "sierpień",
                "wrzesień",
                "październik",
                "listopad",
                "grudzień"
            };

        [TestMethod]
        public void testAllDates()
        {
            for (int i = 1; i <= 12; i++)
            {
                DateTime dt = "2010-{0}-1".FormatWith(i).ToDate();
                Assert.AreEqual(months[i - 1], dt.MonthPolishName());
            }
        }

        [TestMethod]
        public void testToday()
        {
            string month = months[DateTime.Now.Month - 1];
            Assert.AreEqual(month, DateTime.Now.MonthPolishName());
        }
    }
}
